﻿@model Silvia.Models.Admin.PriceBookModel
@{
    ViewBag.Title = "夕薇雅化妆工作室 - 报价";
    Model.Caption = "报价";
    Layout = "~/Views/Shared/_AdminLayout.cshtml";
}
<link href="@Url.Content("~/Scripts/ueditor/themes/default/ueditor.css")" rel="stylesheet" type="text/css" />
<script src="@Url.Content("~/Scripts/ueditor/editor_config.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/ueditor/editor_ui_all_min.js")" type="text/javascript"></script>
<script type="text/javascript">
    var editor;
    $(document).ready(function () {

        $('#editor').hide();

        editor = new baidu.editor.ui.Editor({
            UEDITOR_HOME_URL: '../../Scripts/ueditor/',
            iframeCssUrl: '../../Scripts/ueditor/themes/default/iframe.css',
            autoClearinitialContent: true,
            initialContent: '<span style="color:#ccc">请输入内容</span>',
            elementPathEnabled: false,
            minFrameHeight: 400
        });
        editor.render('editor');
        if ($(".content").attr("value") != "") {
            var str = $(".content").attr("value");
            editor.setContent(str);
        }


        $('#editor').show();
    });

    $(document).ready(function () {
        $("#btnConfirm").ligerButton(
        {
            click: function () {
                $(".content").attr("value", editor.getContent());
                $('form').submit();
            }
        });
    });
</script>
@using (Html.BeginForm())
{
    @Html.HiddenFor(m => m.Content, new { @class = "content" })

    <div class="system_input_contain">
        <div class="input-text">
            <div id='editor'>
            </div>
        </div>
        <div class="input-text">
            <input type="button" id="btnConfirm" value="确定" />
        </div>
    </div>
}